/// 页面 * 弹框

<template>
  <Page>
    <ASelect
      v-model:value="select.value"
      :options="select.options"
      style="width: 150px"
      placeholder="请选择"
    />
    <div>value: {{ select.value }}</div>
    <div>options: {{ select.options }}</div>
  </Page>
</template>

<script setup lang="ts">
// import type { Selecty } from '@expresso/plus'
// import { str2Options } from '@expresso/plus'

/* const selecty = shallowReactive({
  // options: str2Options('1-下拉项1,2-下拉项2,3-下拉项3'),
  options: arry2Options([[1, '下拉项1'], [2, '下拉项2'], [3], 4]),
} as Selecty) */

const select = useSelecty({
  codes: 'id,name',
  data: [
    { id: 1, name: 'Darwin', age: 25, sex: 'Man' },
    { id: 2, name: 'Newton', age: 28, sex: 'Man' },
    { id: 3, name: 'Jobs', age: 22, sex: 'Man' },
    { id: 4, name: 'Einstein', age: 25, sex: 'Man' },
    { id: 5, name: 'Plato', age: 25, sex: 'Man' },
  ],
})
</script>

<style scoped lang="scss"></style>
